.class public Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;
.super Lcom/bitauto/autoeasy/tool/ArrayListAdapter;
.source "HotArticleAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/bitauto/autoeasy/tool/ArrayListAdapter",
        "<",
        "Lcom/bitauto/autoeasy/bbs/Object/HotArticle;",
        ">;"
    }
.end annotation


# instance fields
.field TAG:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 24
    invoke-direct {p0, p1}, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;-><init>(Landroid/app/Activity;)V

    .line 21
    const-string v0, "HotArticleAdapter"

    iput-object v0, p0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->TAG:Ljava/lang/String;

    .line 25
    return-void
.end method


# virtual methods
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 28
    move-object v2, p2

    .line 31
    .local v2, root:Landroid/view/View;
    if-nez v2, :cond_0

    .line 32
    iget-object v3, p0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->mContext:Landroid/app/Activity;

    invoke-virtual {v3}, Landroid/app/Activity;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v1

    .line 33
    .local v1, inflater:Landroid/view/LayoutInflater;
    const v3, 0x7f030004

    const/4 v4, 0x0

    invoke-virtual {v1, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    .line 35
    new-instance v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;

    invoke-direct {v0}, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;-><init>()V

    .line 36
    .local v0, holder:Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;
    const/high16 v3, 0x7f0b

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->title:Landroid/widget/TextView;

    .line 37
    const v3, 0x7f0b0003

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->date:Landroid/widget/TextView;

    .line 38
    const v3, 0x7f0b0001

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iput-object v3, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    .line 40
    invoke-virtual {v2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 44
    .end local v1           #inflater:Landroid/view/LayoutInflater;
    :goto_0
    iget-object v3, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    const v4, 0x7f020008

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v3, v4}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setDefaultImage(Ljava/lang/Integer;)V

    .line 45
    iget-object v4, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v3, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;->getFilepath()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->getListView()Landroid/widget/ListView;

    move-result-object v5

    invoke-virtual {v4, v3, p1, v5}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setImageUrl(Ljava/lang/String;ILandroid/widget/ListView;)V

    .line 46
    iget-object v4, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->title:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v3, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;->getTITLE()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v4, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 47
    iget-object v4, v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;->date:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    iget-object v3, p0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v3, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;->getPostdatetime()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v5, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "     "

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v5, p0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v5, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/bbs/Object/HotArticle;->getPoster()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v4, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 49
    return-object v2

    .line 42
    .end local v0           #holder:Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;
    .restart local p0
    :cond_0
    invoke-virtual {v2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;

    .restart local v0       #holder:Lcom/bitauto/autoeasy/bbs/Adapter/HotArticleAdapter$ViewHolder;
    goto :goto_0
.end method
